package com.hm.prac;

public class SalariedEmployee extends Employee{
    private double monthSalary;

    public SalariedEmployee(MyDate birthday, double num, String name, double monthSalary) {
        super(birthday, num, name);
        this.monthSalary = monthSalary;
    }

    public SalariedEmployee() {
    }

    @Override
    public double earnings() {
        return monthSalary;
    }

    @Override
    public String toString() {
        return "SalariedEmployee["+super.toString()+"]";
    }
}
